import request from "@/utils/request";

// 查询工序管理列表
export function listRecipe(query) {
  return request({
    url: "tech/techRecipe/list",
    method: "get",
    params: query,
  });
}

// 查询工序管理详细
export function getRecipe(params) {
  return request({
    url: "tech/techRecipe/queryByRecipeCode",
    method: "post",
    params,
  });
}

// 新增工序管理
export function addRecipe(data) {
  return request({
    url: "tech/techRecipe/add",
    method: "post",
    data: data,
  });
}

// 修改工序管理
export function updateRecipe(data) {
  return request({
    url: "tech/techRecipe/edit",
    method: "post",
    data: data,
  });
}

// 删除工序管理
export function delRecipe(params) {
  return request({
    url: "tech/techRecipe/delete",
    method: "post",
    params,
  });
}
// 删除工序管理
export function delBatchRecipe(params) {
  return request({
    url: "tech/techRecipe/deleteBatch",
    method: "post",
    params,
  });
}
// 工序物料列表
export function recipeMatList(params) {
  return request({
    url: "tech/techRecipeMaterial/list",
    method: "get",
    params,
  });
}
// 工序物料列表
export function delRecipeMat(params) {
  return request({
    url: "tech/techRecipeMaterial/delete",
    method: "post",
    params,
  });
}
// 工序物料列表
export function addRecipeMat(data) {
  return request({
    url: "tech/techRecipeMaterial/add",
    method: "post",
    data,
  });
}
// 工序物料列表
export function editRecipeMat(data) {
  return request({
    url: "tech/techRecipeMaterial/edit",
    method: "post",
    data,
  });
}
// 获取产品列表
export function matFeignSelect(params) {
  return request({
    url: "base/matMaterial/queryMatByTypeListPage",
    method: "get",
    params,
  });
}
// 获取产品列表
export function syncErpRecipeBom(params) {
  return request({
    url: "tech/techRecipe/syncErpRecipeBom",
    method: "get",
    params,
  });
}
